package com.xiaolin.sports.view;

import java.math.BigDecimal;

import com.xiaolin.sports.model.CourseInfo;

public class CourseListView extends CourseInfo {

	private static final long serialVersionUID = 9012738364308856225L;

	private Integer schoolId;
	
	private BigDecimal disPrice;
	
	private String schoolName;
	
	private String schoolAddr;
	
	private Integer userId;
	
	private Integer disId;
	
	public Integer getSchoolId() {
		return schoolId;
	}

	public void setSchoolId(Integer schoolId) {
		this.schoolId = schoolId;
	}

	public BigDecimal getDisPrice() {
		return disPrice;
	}

	public void setDisPrice(BigDecimal disPrice) {
		this.disPrice = disPrice;
	}

	public String getSchoolName() {
		return schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	public String getSchoolAddr() {
		return schoolAddr;
	}

	public void setSchoolAddr(String schoolAddr) {
		this.schoolAddr = schoolAddr;
	}
	
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getDisId() {
		return disId;
	}

	public void setDisId(Integer disId) {
		this.disId = disId;
	}

	public BigDecimal getCurrentPrice() {
		if(userId == null) {
			return getOnlinePrice();
		}
		if(disId != null) return getDisPrice();
		return getSchoolPrice();
	}
	
	public String getCurrentAddr() {
		if(userId == null) {
			return getAddr();
		}
		return getSchoolAddr();
	}
	
}
